package com.learn.mapstruct.targetType;

import com.learn.mapstruct.targetType.factory.TargetTypeFactory;
import com.learn.mapstruct.targetType.model.TargetTypeEntity;
import com.learn.mapstruct.targetType.model.TargetTypeEntity2;
import org.mapstruct.Context;
import org.mapstruct.InheritInverseConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(uses = TargetTypeFactory.class)
public interface TargetTypeMapper {

	@Mapping(target = "name", source = "name2")
	TargetTypeEntity to(TargetTypeEntity2 source, @Context String data);

	@InheritInverseConfiguration
	TargetTypeEntity2 from(TargetTypeEntity source);
}
